package com.d2rv.model;

import com.d2rv.offscreen.OffScreen3D;
import javax.media.opengl.GL;
import processing.core.PApplet;
import processing.core.PVector;

/**
 * This class contains model of the instruction arrow
 * @author Darrieutort A., Dupouy A., Rossignol L., Van Poucke A.
 */
public class ArrowModel extends ObjModel {

    /**
     * Default Constructor
     * @param parent The current application
     * @param path The path of the obj model
     * @param position The position of the model
     */
    public ArrowModel(PApplet parent, String path, PVector position) {
        super(parent, path, position);
    }

    /**
     * Contains the instruction to draw the model
     * @param parent The current offscreen
     */
    public void draw(OffScreen3D parent) {
    }

    /**
     * Contains the instruction to draw the model
     * @param parent The current offscreen
     * @param angleTarget The angle of rotation of the model
     */
    public void draw(OffScreen3D parent, float angleTarget) {
        GL gl = parent.beginGL();
        parent.scale(this.scale.x, this.scale.y, this.scale.z);
        parent.translate(this.position.x, this.position.y, this.position.z);
        parent.rotateY(angleTarget);
        this.model.drawGL(gl);
        parent.endGL();
    }
}